package com.mesa.android.debtsapp.base

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
import com.mesa.android.debtsapp.R

abstract class BaseFragment<T>: Fragment() {

    var binding: T?= null

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        val view = inflater.inflate(resourceId(), null)
        binding = DataBindingUtil.bind(view)
        return view
    }

    abstract fun resourceId():Int

    abstract fun initView()
    abstract fun initData()
    abstract fun initEvent()
}